package com.learn.eduorderboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 支付订单信息表
 * </p>
 *
 * @author m
 * @since 2022-04-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="PayOrder对象", description="支付订单信息表")
public class PayOrder implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "主键")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单号(唯一)")
    private String orderNo;

    @ApiModelProperty(value = "用户ID")
    private Integer userId;

    @ApiModelProperty(value = "商品唯一标识(ID)")
    private Integer productId;

    @ApiModelProperty(value = "产品名称")
    private String productName;

    @ApiModelProperty(value = "金额,单位元")
    private BigDecimal amount;

    @ApiModelProperty(value = "商品数量")
    private Integer count;

    @ApiModelProperty(value = "货币类型，cny-人民币 gbeans-勾豆")
    private String currency;

    @ApiModelProperty(value = "支付渠道：weChat-微信支付，aliPay-支付宝支付,applePay-苹果支付")
    private String channel;

    @ApiModelProperty(value = "订单状态：1-未支付 2-支付成功 3-支付失败 -1-订单失效")
    private Integer status;

    @ApiModelProperty(value = "渠道中的状态码值")
    private Integer channelStatus;

    @ApiModelProperty(value = "类型 1-购买课程 2-充值")
    private Integer orderType;

    @ApiModelProperty(value = "支付来源 1-app 2-h5 3-pc")
    private Integer source;

    @ApiModelProperty(value = "用户支付IP")
    private String clientIp;

    @ApiModelProperty(value = "购买账号id")
    private String buyId;

    @ApiModelProperty(value = "外部支付渠道交易号")
    private String outTradeNo;

    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "附加字段，KV json，例如:{'mobile':13020202,'success_url':123}")
    private String extra;

    @ApiModelProperty(value = "商品订单编号")
    private String goodsOrderNo;

    @ApiModelProperty(value = "支付所使用的平台：1 拉勾 2 拉勾教育")
    private Integer platform;

    @ApiModelProperty(value = "微信类型, 参考自lg-wechat-boot项目中的wxinfo")
    private Integer wxType;


}
